<script>
    import BaseShopList from '@c/BaseShopList/BaseShopList'//店铺列表
    import {ShopList} from "./shop";

    export default {
        data() {
            return {
                ShopList,
                tabList: [
                    {
                        id: 0,
                        label: '综合排序'
                    },
                    {
                        id: 1,
                        label: '销量优先'
                    }
                ],
                currentTabIndex: 0,
            }
        },
        components: {
            BaseShopList,
        },
        methods: {
            /**
             * @Description 切换tab
             * @author Anonymous
             * @date 2019/6/4
             */
            e_selectTab(id) {
                this.currentTabIndex = id
            }

        },
        mounted() {
        },
        created() {
        }
    }
</script>
<template>
    <div class="ShopList">
        <!--顶部切换-->
        <div class="tabArea">
            <span class="tabLabel" :class="currentTabIndex == v.id?'activetab':''" v-for="(v,i) in tabList" :key="i"
                  @click="e_selectTab(v.id)">{{v.label}}</span>
        </div>
        <!--店铺列表区域-->
        <div class="shopListArea">
            <!--店铺列表-->
            <BaseShopList :ShopList="ShopList"/>
        </div>
    </div>
</template>
<style lang='scss' scoped>
    @import "ShopList";
</style>
